package org.zcl.service.convert;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.zcl.entity.dto.ThirdDto;
import org.zcl.enums.PayToolEnum;
import org.zcl.service.factory.ChannelServiceFactory;

/**
 * @author zhuchenglin
 * @since 2022/8/22 14:08
 */
@Component
public class ThirdPayConverter implements ChannelPayConverter {

    @Autowired
    private ChannelServiceFactory factory;

    @Override
    public void register() {
        factory.registerChannelPayConverter(PayToolEnum.THIRD.getCode(), this);
    }

    @Override
    public Object convert() {
        ThirdDto thirdDto = new ThirdDto();
        thirdDto.setTrade_no("1");
        thirdDto.setOut_trade_no("1000");
        return thirdDto;
    }
}
